package com.muchfish.reactor.api;

import reactor.core.publisher.Mono;

import java.util.concurrent.Callable;

public class ReactorFromCallableExample {
    public static void main(String[] args) {
        // 创建带有返回值的 Mono
        Mono<String> resultMono = Mono.fromCallable(() -> {
            // 执行一些计算
            return "Result";
        });

        resultMono.subscribe(System.out::println);
    }
}
